<?php
include_once('common/header.php');			
if($AppUI->id <=0 || !isset($_SERVER['HTTP_REFERER'])) {
	Vfriend_Function::redirect(HOST_VFRIEND);
}
$strRefer	= isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$intNewsId	= $objRequest->getParam('newsid', 0);
$strToken	= $objRequest->getParam('token', '');
$strSession	= Vfriend_Function::getSecret($intNewsId, SE_NEWS_PLEVEL_ID);
$intError	= 0;
if($intError == 0 && $intNewsId && $strToken != '' && $strToken == $strSession && Vfriend_Function::isValidLink($strRefer)) {
	Vfriend_Function::deleteSecret($intNewsId, SE_NEWS_PLEVEL_ID);
	$objNews	= new News();
	$intError	= $objNews->plusLnews($AppUI->id, $intNewsId);
	if($intError == 0) {
		Vfriend_Function::setMsg($arrMessage[12]);		
	} else {
		$intError += 14;
	}
} else {
	$intError = 14;
}
if($intError > 0) {
	$strError = $arrError[$intError];	
	Vfriend_Function::setError($strError);	
}
Vfriend_Function::redirect($strRefer ? $strRefer : LINK_NEWS);
?>
